<?php

namespace Mlym\CodeGeneration\Middleware\Bean\View\Validate;

use EasySwoole\Spl\SplBean;

class ValidateBean extends SplBean
{
    protected $validator;
    protected $message;
    protected $trigger = 'blur';
    protected $api;
    protected $extra;

    protected function setClassMapping(): array
    {
        return [
            'api' => ApiBean::class,
            'extra' => ExtraBean::class,
        ];
    }

    /**
     * @return mixed
     */
    public function getValidator()
    {
        return $this->validator;
    }

    /**
     * @param mixed $validator
     */
    public function setValidator($validator): void
    {
        $this->validator = $validator;
    }

    /**
     * @return mixed
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * @param mixed $message
     */
    public function setMessage($message): void
    {
        $this->message = $message;
    }

    /**
     * @return string
     */
    public function getTrigger(): string
    {
        return $this->trigger;
    }

    /**
     * @param string $trigger
     */
    public function setTrigger(string $trigger): void
    {
        $this->trigger = $trigger;
    }

    /**
     * @return mixed
     */
    public function getApi()
    {
        return $this->api;
    }

    /**
     * @param mixed $api
     */
    public function setApi($api): void
    {
        $this->api = $api;
    }

    /**
     * @return mixed
     */
    public function getExtra(): ExtraBean
    {
        return $this->extra;
    }

    /**
     * @param mixed $extra
     */
    public function setExtra($extra): void
    {
        $this->extra = $extra;
    }


}